package com.blog.Controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class IndexController {

    @GetMapping(value = "/index.html")
    public String Index(HttpServletRequest request){
        request.setAttribute("key", "hello world");
        return "/index";
    }

    @GetMapping(value="/MyIndex")
    public String toMyIndex(HttpServletRequest request){
        request.setAttribute("","");
        return "/blog/MyIndex";
    }
}
